package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 邀请记录表
 *
 * @author 16693103420
 * @since 2024-02-03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_invite_record")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class InviteRecordModel implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//邀请记录表ID
    private Integer inviteId;//邀请人ID
    private Integer quiltInviteId;//被邀请人ID

    private Integer number;//邀请次数
    private Integer status;
    @TableField(exist = false)
    private String userName;//被邀请人用户姓名
    @TableField(exist = false)
    private String phone;//被邀请人手机号
    @TableField(exist = false)
    private String faceUrl;//被邀请人用户头像
    @TableField(exist = false)
    private String invitationCode;
    @TableField(exist = false)
    private Integer vip;


    @TableField(exist = false)
    private Double todayConsume;//被邀请人今日消费益联券
    @TableField(exist = false)
    private Double sumConsume;//被邀请人累计消费

    @TableField(exist = false)
    private Double todayIncome;//用户今日收益

    @TableField(exist = false)
    private Double contributeIntegral;//用户贡献积分

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;

    //是否生效 1是 0 否
    private Integer isAct;

    @TableField(exist = false)
    private String cityName;

}
